package org.csu.mypetstore.persistence;

import org.apache.ibatis.annotations.Param;
import org.csu.mypetstore.domain.Product;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductMapper {

    List<Product> getProductListByCategory(String categoryId);

    List<Product> getAllProducts();

    Product getProduct(String productId);

    List<Product> searchProductList(String keywords);

    List<Product> searchProductById(String id);

    List<Product> searchProductByIdAndCategory(@Param("id")String id, @Param("category")String category);

    void removeProduct(Product product);

    void updateProduct(Product product);

    void addProduct(Product product);

}
